<!DOCTYPE html>
<html>
{include file="public/head" /}
<body>
          <div class="nav-tabs-custom" style="box-shadow:0 0 0 0; margin:5px;">
            <ul class="nav nav-tabs">
            <li class="active"><a href="#tab_1" data-toggle="tab">基础设置</a></li>
            <li><a href="#tab_2" data-toggle="tab">扩展设置</a></li>               
            </ul> 
        <form id="myform" class="myform form-horizontal"  method="post">
       <input type="hidden" id="actor_id" name="actor_id" value="{$info['actor_id']|default=''}"> 
       <div class="box-body">
           <div class="tab-content tab-fade fade active in " id="tab_1"> 
           <div class="row">
           {notempty name="info.actor_vid"}
                <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr00">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">视频名称：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
               <input type="text" class="form-control" id="vod_name" name="vod_name" value="{$info.vod.vod_name|default=''}" readonly> 
              </div>   
              </div>          
                 <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">视频ID：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
               <input type="text" class="form-control" id="actor_vid" name="actor_vid" value="{$info.actor_vid|default=''}" readonly> 
              </div>   
              </div> 
               <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">演员表分类：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
 <select id="actor_cid" name="actor_cid" class="form-control select2" required="required" placeholder="请选择分类" style="width:100%">
{volist name=":F('_data/listactor')" id="vo"}
 {notempty name="vo.son"}
<optgroup label="{$vo.list_name}">
{volist name="vo['son']" id="splist"}
<option value="{$splist.list_id}" {eq name="splist.list_id" value="$info['actor_cid']"}selected{/eq}>├ {$splist.list_name}</option>
{/volist}
  </optgroup>
{else/}
  <option value="{$vo.list_id}" {eq name="vo.list_id" value="$info['actor_cid']"}selected{/eq}>{$vo.list_name}</option>
{/notempty}
{/volist}
</select>
              </div>   
              </div> 
                  <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <span class="text-link form-control">
               <span class="pretty success input-xz">
<input name="sendurl" type="checkbox" value="1" id="checkbox" {empty name="info['actor_id']"}checked{/empty}> 
<label><i class="mdi mdi-check"></i> 推送百度</label>
</span></span>  
              </div>  
      {else/}
                <div class="col-md-3 col-sm-4 col-xs-4 mb10 pr00">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">视频ID：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
               <input type="text" class="form-control" id="actor_vid" name="actor_vid" value="{$info.vod_id|default=''}"> 
              </div>   
              </div>    
               <div class="col-md-3 col-sm-4 col-xs-4 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">演员表分类：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
 <select id="actor_cid" name="actor_cid" class="form-control select2" required="required" placeholder="请选择分类" style="width:100%">
{volist name=":F('_data/listrole')" id="vo"}
 {notempty name="vo.son"}
<optgroup label="{$vo.list_name}">
{volist name="vo['son']" id="splist"}
<option value="{$splist.list_id}" {eq name="splist.list_id" value="$info['actor_cid']"}selected{/eq}>├ {$splist.list_name}</option>
{/volist}
  </optgroup>
{else/}
  <option value="{$vo.list_id}" {eq name="vo.list_id" value="$info['actor_cid']"}selected{/eq}>{$vo.list_name}</option>
{/notempty}
{/volist}
</select>
              </div>   
              </div>  
              

          <div class="col-md-6 col-sm-4 col-xs-4 mb10">
               <span class="text-link form-control" style="border:none">
               <span class="pretty success input-xz">
<input name="sendurl" type="checkbox" value="1" id="checkbox" {empty name="info['tv_id']"}checked{/empty}> 
<label><i class="mdi mdi-check"></i> 推送百度</label>
</span></span>  
              </div>  
                          
                                                     
  {/notempty}      


     <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-title">演员表标题：</span>

                </div>
                <!-- /btn-group -->
                <input type="text" id="actor_title"  name="actor_title" value="{$info.actor_title|default=''}" placeholder="用于前台页面的SEO标题" class="form-control">
              </div>
              
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-title">演员关键词：</span>
                
                </div>
                <!-- /btn-group -->
                <input type="text" id="actor_keywords"  name="actor_keywords" value="{$info.actor_keywords|default=''}" class="form-control" placeholder="用于前台页面的关键词,填写关键词获取,留空获取名称关键词长尾词" >
                <span class="input-group-btn">
                 <button type="button" class="btn btn-success btn-flat getkeywords" data-name="vod_name" data-names="actor_keywords" data-id="actor_keywords" data-type="演员"><i class="fa fa-plus"></i> 获取关键词</button>
                 </span>
                  <span class="input-group-btn">
                 <span class="pretty success input-xz">
<input name="auto_keywords" type="checkbox" value="1" id="checkbox" {notempty name=":config('system.system_auto_keywords')"}checked{/notempty}> 
<label><i class="mdi mdi-check"></i> 自动获取</label>
</span>
</span>                  
                
              </div>



      
               <div class="col-md-5 col-sm-12 col-xs-12 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">演员表属性：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="hidden" name="actor_prty" value="">
             <span class="text-link form-control">
                      {volist name=":parse('textarea',config('setting.document_position'))" id="vo"}
                      <label class="pretty success">
	  <input type="checkbox" name="actor_prty[]" value="{$key}" id="checkbox" {if check_attribute($info['actor_prty'],$key)}checked="checked"{/if}> 
	  <label><i class="mdi mdi-check"></i> {$vo|msubstr=0,2}</label>
	</label>
                      {/volist} 
            </span> 
               </div> 
               </div> 
                                <div class="col-md-2 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">演员表状态：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
<select name="actor_status"  id="actor_status" class="form-control select2" style="width:100%">
    <option value="1">已审</option>
     <option value="0" {eq name="info.actor_status" value="0" }selected{/eq}>未审</option>
</select> 
              </div>   
              </div>  
              <div class="col-md-5 col-sm-6 col-xs-6 mb10">
                <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">更新时间：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
              <input type="text" name="actor_addtime" value="{notempty name="info.actor_addtime"}{$info.actor_addtime|date='Y-m-d H:i:s',###}{else/}{:date('Y-m-d H:i:s',time())}{/notempty}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss">
              
<span class="input-group-btn">
<span class="pretty success input-xz">
<input name="actor_checktime" type="checkbox" value="1" id="checkbox" {notempty name=":config('system.system_uptime')"}checked{/notempty}> 
<label><i class="mdi mdi-check"></i> 更新时间</label>
</span>
</span>     
              </div> 
              </div>
                              <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色采集：</span>
               <span class="form-left-title-hide"></span>
                </div>
            <input type="text" class="form-control" id="actor_reurl" name="actor_reurl" value="{$info.actor_reurl|default=''}" placeholder="支持百度,360百科,TV2345视频地址" >
                        <span class="input-group-btn">
                      <button type="button" class="btn  btn-primary btn-flat get_role">获取资料</button>
                    </span>
                </div> 
                <div class="col-md-12 col-sm-12 col-xs-12 mb10" id='contents'></div>   
               </div>
              <!-- /row --> 
            </div>
            <!-- /.tab_1-->
           <div class="tab-content tab-fade fade " id="tab_2">
            <div class="row">         
             <div class="col-md-3 col-sm-6 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">推荐星级：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input name="actor_stars" id="actor_stars" type="hidden" value="{$info.actor_stars|default=''}">
                <span class="text-link form-control" style="padding-top:4px;">
                {volist name=":admin_star_arr($info.actor_stars)" id="ajaxstar"}<img src="{$Think.TPL_PATH}tpl/zanpianadmin/img/star{$ajaxstar}.gif" id="actor_{$i}" class="addstars" width="19px" height="19px">{/volist}
                </span>
              </div>   
              </div>              
             <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">独立模版：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="actor_skin"  value="{$info.actor_skin|default=''}" class="form-control text-center" placeholder="留空使用分类中内容模版">
              </div>   
              </div> 
              
             <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">总人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="actor_hits" name="actor_hits"  value="{$info.actor_hits|default=''}" class="form-control text-center" >
              </div>   
              </div>
              
             <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">月人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="actor_hits_month"  value="{$info.actor_hits_month|default=''}" class="form-control text-center" >
              </div>   
              </div> 
              <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">周人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="actor_hits_week"  value="{$info.actor_hits_week|default=''}" class="form-control text-center" >
              </div>   
              </div>                                          
                                                                                    
              <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">日人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="actor_hits_day"  value="{$info.actor_hits_day|default=''}" class="form-control text-center" >
              </div>   
              </div> 
              
               <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">顶人数：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="actor_up" name="actor_up"  value="{$info.actor_up|default='0'}" class="form-control text-center" >
              </div>   
              </div>
                           
                <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">踩人数：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="actor_down" name="actor_down"  value="{$info.actor_down|default='0'}" class="form-control text-center" >
              </div>   
              </div>
              </div>
              <!-- /row -->
                             
              
                                             
            </div> 
            <!-- /.tab_2 -->
         
        <div class="box-footer {notempty name=":request()->param('dialog')"}hidden{/notempty} layer-footer">
          <div  class="footer-btn">
               <button type="submit" class="btn btn-success btn-embossed">确定</button>
               <button type="reset" class="btn btn-default btn-embossed">重置</button>
               {notempty name=":request()->param('dialog')"}
               <button type="reset" class="btn btn-primary btn-embossed btn-close" onClick="layer.closeAll();"> 关闭</button>
               {/notempty}
            </div>
       </div>
       <!-- /.box-footer -->     
</div>
<!-- /.box-body --> 
</form>
</div>

<!-- /.nav-tabs-custom -->    
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
	zanpian.table.load();
    zanpian.form.load($("#myform"));
	if ($("#contents").size()>0 && $("input[name=actor_vid]").val()){
		url= '{:url('role',array('vid'=> $info['actor_vid']))}';
		zanpian.api.url(url);
	}
   $(document).on('click', ".get_role", function(){
			 var actor_vid = $("#actor_vid").val();
			 var actor_reurl = $("#actor_reurl").val();
			 var actor_status = $("#actor_status").val();
			 if(actor_vid==''){
				return layer.msg('视频ID为空', {icon: 2});
			 }
			if(actor_reurl==''){
				return layer.msg('采集地址不能为空', {icon: 2});
			 }
			 layer.msg('数据获取中...');
			 $.ajax({
					type: 'post',
					url: zanpian.api.fixurl('get/actor'),
					data: {'actor_vid':actor_vid,'actor_status':actor_status,'actor_reurl':actor_reurl},
					dataType: 'json',
					success: function(data) {
							if (data.code >= 1) {
								layer.msg(data.msg ? data.msg : '采集入库角色成功', {icon:1,time: 1800});
								if(data.url){
								     zanpian.api.url(zanpian.api.fixurl('actor/role/vid/'+actor_vid));
								}
							} else {
						        layer.msg(data.msg ? data.msg : '采集入库角色失败', {icon:2,time: 1800});
					        }
					},
				     error: function(data) {
					      layer.confirm('程序返回：' + data.status + ' 错误,点击查看详细错误', {zIndex:layer.zIndex,icon: 5, title:'出错啦！',btn: ['查看', '关闭']}, function() {$('html').html(data.responseText);});
				            },
			});
   })     	
});	
</script>
</body>
</html>
